package org.task;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class StartActivity extends Activity {

	private Button startButton;
	private Button stopButton;
	private Button changeTaskButton;
	private ChangeTask changeTask;

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        startButton = (Button) findViewById(R.id.startButton);
        startButton.setOnClickListener(startListener);

        stopButton = (Button) findViewById(R.id.stopButton);
        stopButton.setOnClickListener(stopListener);

        changeTaskButton = (Button) findViewById(R.id.changeTaskStartButton);
        changeTaskButton.setOnClickListener(changeTaskListener);

        changeTask = new ChangeTask(this);
    }

    private OnClickListener startListener = new OnClickListener() {
        public void onClick(View view) {
            Intent intent = new Intent(StartActivity.this, GetTaskActivity.class);
            startActivity(intent);
        }
    };

    private OnClickListener stopListener = new View.OnClickListener() {
    	public void onClick(View v) {

    	}
    };

    private OnClickListener changeTaskListener = new View.OnClickListener() {
		public void onClick(View v) {
			changeTask.changeTask();
		}
	};
}